package models

type Admin struct {
	Id         uint
	Root       int
	Name       string
	Type       int
	Account    string
	Password   string
	Salt       string
	RoleId     int
	CreateTime int
	UpdateTime int
	LoginTime  int
	LoginIp    string
	Disable    int
	Del        int
}

// 指定表名
func (Admin) TableName() string {
	return "admin" // 替换为你想要的表名
}

// 用token查询一条记录
func (admin *Admin) FindById(Id uint) *Admin {
	orm.Where(&Admin{Id: Id}).First(admin)
	return admin
}